package com.itheima;

public class Test1 {
    public static void main(String[] args) {
        //完成买飞机票案例
        double rs = buyPlaneTicket(1000,6,1);
        System.out.println(rs);
    }
    public static double buyPlaneTicket(double price,int month,int type){
        if(month >=5 && month <=10){
            if(type == 1) return price * 0.9;
            else if (type ==2 ) return price * 0.85;
            else return price;
        }else{
            if(type == 1) return price * 0.8;
            else if (type ==2 ) return price * 0.75;
            else return price;
        }
    }

    }

